package com.lincoln.server.user;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.net.InetAddress;
import java.net.UnknownHostException;

@Component
public class FeignFallBack implements FeignService {
    @Value("${server.port}")
    private int port;

    @Override
    public String sendSms(String content) {
        try {
            return "[本次查询由服务器" + InetAddress.getLocalHost().getHostAddress() + ":" + port + "处理->" + "调用短信服务失败!";
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
        return "系统错误";
    }
}
